//package com.yishun.springboot.exception;
//
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.web.bind.annotation.ControllerAdvice;
//import org.springframework.web.bind.annotation.ExceptionHandler;
//
//import javax.servlet.http.HttpServletRequest;
//
///**
// * 无法对定时任务进行全部捕捉，因为定时任务是单独线程运行
// */
//@ControllerAdvice
//@Slf4j
//public class GlobalExceptionHandler {
//
//    @ExceptionHandler(value = Throwable.class)
//    public void defaultErrorHandler(HttpServletRequest req, Exception e) {
//        e.printStackTrace();
//        log.info("Exception" + e.getMessage());
//    }
//}
